@import '../../style/themes/index';
@import '../../style/mixins/index';
@import './mixin.less';

@preview-prefix-cls: ~'@{cls-prefix}-preview';
@image-prefix-cls: ~'@{cls-prefix}-img';
@icon-prefix-cls: ~'@{cls-prefix}-icon';

.@{image-prefix-cls} {
    &__inner, &__error,  &__placeholder, &__inner-image{
        width: 100%;
        height: 100%;
    }
    &__placeholder, &__error {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--f-text-color-secondary);
        font-size: @font-size-caption;
        line-height: @line-height-base;
        background: var(--f-component-bg-color);
        svg {
            padding-bottom: @padding-xs;
            color: var(--f-text-color-disabled-light);
            font-size: 46px;
        }
    }
}

.@{preview-prefix-cls} {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--f-mask-dark-color);
    &__btn {
        position: absolute;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        color: var(--f-white);
        font-size: @font-size-head;
        background:  var(--f-mask-dark-color);
        border-radius: 50%;
        cursor: pointer;
    }
    &__close {
        top: @padding-lg;
        right: @padding-lg;
    }
    &__arrow {
        &-left {
            top: 50%;
            left: @padding-lg;    
            margin-top: -20px;
            
        }
        &-right {
            top: 50%;
            right: @padding-lg;
            margin-top: -20px;
        }
    }
    &__name {
        position: absolute;
        bottom: 80px;
        left: 50%;
        z-index: 1;
        width: 1000px;
        color: var(--f-text-color-caption);
        font-size: calc(var(--f-font-size-base) - 2px);
        text-align: center;
        transform: translateX(-50%);
    }
    &__toolBar {
        position: absolute;
        bottom: 30px;
        left: 50%;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-around;
        width: 176px;
        height: 40px;
        color: var(--f-white);
        font-size: @font-size-head;
        background: var(--f-mask-color);
        border-radius: var(--f-border-radius-base);
        transform: translate(-50%);
        svg {
            cursor: pointer;
        }
    }
    &__canvas {
        user-select: none;
        &.is-dragging {
            cursor: move;
        }
    }
    & &-download {
        width: 16px;
        height: 16px;
        color: var(--f-white);
        .fes-design-icon {
            vertical-align: top;
        }
    }
}